/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jse;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

/**
 *
 * @author WangShuai
 */
public class URLEncoderTest {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String s = "中文@!#.txt";
        System.out.println(URLEncoder.encode(s, "UTF-8"));
        System.out.println(URLEncoder.encode(s, "GBK"));
    }
}
